<!-- getting the current URI to set the currentController, currenView, projectId-->
<% String ur="${request.forwardURI}"
def cont=Inter.outSplit(ur,'cont')
def vie=Inter.outSplit(ur,'vie')
def proID=Inter.outSplit(ur,'proID')
def param = Inter.splitParam(request.getParameters().toString())

%>
<html>
    <head>
        <title><g:layoutTitle default="MegaSoft" /></title>
        <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
        <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        <g:layoutHead />
        <g:javascript src="jquery.js" />
        <g:javascript library="application" />
        <g:javascript src="detectClose.js" />
        <!--<g:javascript src="modification.js" />-->

    </head>
    <body>

      
        <div id="spinner" class="spinner" style="display:none;">
          <img src="${resource(dir:'images',file:'spinner.gif')}" alt="Spinner" />
        </div>
        <div class="logo">
          <a href="http://www.hetmedia.se/megasoft/" target="_blank" ><img src="${resource(dir:'images',file:'merp_logo_small.png')}" style="float:left; margin-left:10px;" alt="IDA" border="0" /></a>
           <!--the language button with flag and so on-->
           <div style="float:right">
            <g:btnLanguage language="${session.language}"  currentController="${cont}" currentView="${vie}" param="${param}" idProject="${proID}"></g:btnLanguage>
           </div>
          </div>
      <div class="nav" style="padding:0px">
          <table style="border:none; margin:0px;">
            <tr>
              <td>
                <div>
                  <span class="menuButton"><a class="home" href="${resource(dir:'')}">${Inter.printOut('Home',session.language)}</a></span>
                  
                    <span class="menuButton"><g:link class="listEmployee" controller="employee" action="list">${Inter.printOut('Employees',session.language)}</g:link></span>
                    <span class="menuButton"><g:link class="listProject" controller="project" action="list">${Inter.printOut('Projects',session.language)}</g:link></span>
                    <span class="menuButton"><g:link class="listCourses" controller="course" action="list">${Inter.printOut('Courses',session.language)}</g:link></span>
                    <span class="menuButton"><g:link class="adminPage" controller="admin" action="show">Administration</g:link></span>
                </div>
              </td>
              <td>
                <div align="right">
                   <span>
                   <g:if test="${session?.access}">
                     ${Inter.printOut('Connected as',session.language)} ${session?.access?.userName} |
                      <span class="menuButton"><g:link class="logout" onclick="return confirmSave(${session.modified});" controller="access" action="logout">${Inter.printOut('Log Out',session.language)}</g:link></span>
                    </g:if>
                    <g:else>
                      ${Inter.printOut('Not connected',session.language)} |  <span class="menuButton"><g:link class="login" controller="access" action="login">Log In</g:link></span>
                   </g:else>
                  </span>
                </div>
              </td>
            </tr>
          </table>
      </div>

      <g:layoutBody />
    </body>
</html>
